App({
    onLaunch() {

    },
    checkLogin() {
        var that = this;
        if (that.accountInfo() === null) {
            wx.showToast({
                title: '请登录',
                icon: 'none',
            });
            wx.navigateTo({
                url: `../login/login`
            })
        }
    },
    rootUrl: 'http://192.168.0.181:5589',
    accountInfo: function () {
        var info = wx.getStorageSync('accountInfo') || null;
        return info;
        /* return {
            accountId:1,
            accountNumber:'N001', 
            accountName:'测试教师', 
            accountNick:'测nick', 
            accountType: 1, 
            accountLogo:'/images/default-avatar.png'
        } */
    }
})